<?php
/**
 * Created by PhpStorm.
 * User: liu
 * Date: 2018/9/12
 * Time: 0:06
 */

namespace app\blog\validate;


use think\Validate;

class Comments extends Validate
{
    public $rule=[
        'post_id'=>'require|token',
        'username'=>"require|max:40",
        'email'=>'require|email',
        'content'=>"require|length:5,250",
    ];
    public $message=[
        'post_id'=>"非法请求",
        'username.require'=>'用户必须填写',
        'username.max'=>'用户太长',
        'email'=>'非法邮箱',
        'content.require'=>"请填写内容",
        'content.length'=>"内容只能在5到240个字符"
    ];
}